export default function (http) {
    return {
        queryAll (data){
            return http
                .mock(function () {
                    return [{"code":"index","iconSkin":"icon-shouye","id":"4f6d0f88200f4a969bb75ce24cb50d0b","name":"首页"},{"code":"system","iconSkin":"icon-xitong","children":[{"code":"group","name":"团队管理","id":"eca55cd5fd9b4941b75f2712834ceb2a"},{"code":"memuser","name":"学员管理","id":"4c45606f15314e8ea84b14c66404d60c"},{"code":"menu","name":"菜单管理","id":"821d756f76d74b219a62ea4672b853f1"},{"code":"dict","name":"字典管理","id":"8cf759ec2cb84bceb8caaf64fe1fd326"},{"code":"role","name":"角色管理","id":"d2cca8fc7e1a41a3a108ccbd3ed3e61a"},{"code":"account","name":"账户管理","id":"e95911709013494db532188fb8982a57"},{"code":"otherSystem","name":"其他系统","id":"063ab53557004dd9aea3d2a560e17e04"}],"id":"e0bf31cc54f44c848ba48c3cb9218593","name":"系统设置"}];
                })
                .postJson('/demo/resource/queryAll', data);
        },

	    queryMyAuthMenus (data){
            return http
                .mock(function () {
                    return [{"code":"index","iconSkin":"icon-shouye","id":"4f6d0f88200f4a969bb75ce24cb50d0b","name":"首页"},{"code":"system","iconSkin":"icon-xitong","children":[{"code":"group","name":"团队管理","id":"eca55cd5fd9b4941b75f2712834ceb2a"},{"code":"memuser","name":"学员管理","id":"4c45606f15314e8ea84b14c66404d60c"},{"code":"menu","name":"菜单管理","id":"821d756f76d74b219a62ea4672b853f1"},{"code":"dict","name":"字典管理","id":"8cf759ec2cb84bceb8caaf64fe1fd326"},{"code":"role","name":"角色管理","id":"d2cca8fc7e1a41a3a108ccbd3ed3e61a"},{"code":"account","name":"账户管理","id":"e95911709013494db532188fb8982a57"},{"code":"otherSystem","name":"其他系统","id":"063ab53557004dd9aea3d2a560e17e04"}],"id":"e0bf31cc54f44c848ba48c3cb9218593","name":"系统设置"}];
                })
                .post('/demo/resource/navigate', data);
        },

        getInfo ({_ap, ...params}){
            return http
	            .mock(function () {
		            return {"code":"index","iconSkin":"icon-shouye","id":"4f6d0f88200f4a969bb75ce24cb50d0b","name":"首页"};
	            })
                .get('/demo/resource/get', {params, _ap});
        },

        saveInfo (data){
            return http
                .mock()
                .postJson('/demo/resource/save', data);
        },

        delete (data){
            return http
                .mock()
                .postJson('/demo/resource/delete', data);
        }
    }
}
